#include <stdio.h>
#include <string.h>
#include "dictos.h"

int main(int argc, const char *argv[]) {
    //死循环，接收指令进行动作
    char action[128];
    while(1) {
        printf("您可以下达的指令有:\n");
        printf("    init        初始化系统\n");
        printf("    find <word> 查找单词\n");
        printf("    quit        退出\n");
        printf("请输入您的指令:");
        scanf("%s", action);
        printf("您输入的指令是: %s\n", action);
        if(strncmp(action, "init", 4) == 0) {
            //初始化系统
            dictos_init();
        }
        if(strncmp(action, "find", 4) == 0) {
            //查找单词
        }
        if(strncmp(action, "quit", 4) == 0) {
            //退出系统
            break;
        }
    }
    return 0;
}

